<% experiment ||= report_element.experiment %>
<% timestamp = experiment.created_at %>
<% export_all = defined?(export_all) && export_all %>
<div class="report-element report-experiment-element">
  <div class="report-element-body" data-hook="report-experiment-element">
    <h3 class="experiment-name">
      <%= link_to experiment.name, my_modules_experiment_url(experiment), target: :_blank %>
      <% if experiment.archived? %>
        <span class="label label-warning"><%= t('search.index.archived') %></span>
      <% end %>
    </h3>
    <% unless @settings['exclude_timestamps'] %>
      <div class="user-time">
        <%= t('projects.reports.elements.experiment.user_time', code: experiment.code, timestamp: l(timestamp, format: :full)) %>
      </div>
    <% end %>
    <% if experiment.description.present? %>
      <%= custom_auto_link(experiment.description, team: current_team, base64_encoded_imgs: export_all) %>
    <% end %>
  </div>
  <% if defined?(children) %>
    <div class="report-element-children">
      <%= children %>
    </div>
  <% end %>
</div>
